package cn.kpi.dao.usualassessment;

import java.util.List;
import java.util.Map;

import cn.kpi.entity.usualassessment.*;
import org.apache.ibatis.annotations.Param;

import cn.kpi.common.persistence.MyBatisDao;

@MyBatisDao
public interface UserUATZpDao {

    public int InsertUserUATZpSummary(UserUATZpSummaryEntity entity) throws Exception;

    public int InsertUserUATZpDetail(@Param("usasszpid") Long usasszpid, @Param("userid") Long userid, @Param("templateid") Long templateid, @Param("orgid") Long orgid, @Param("userstatus") String userstatus) throws Exception;

    //public int UpdateUserUATZpDetailScore(@Param("usasszpid")Long usasszpid,@Param("userid")Long userid,@Param("templateid")Long templateid,@Param("createid")Long createid,@Param("zpscore")int zpscore)throws Exception;
    public int UpdateUserUATZpDetailScore(@Param("usasszpid") Long usasszpid, @Param("userid") Long userid, @Param("templateid") Long templateid, @Param("createid") Long createid, @Param("zpscore") Float zpscore) throws Exception;

    public List<UserUATZpDetailEntity> GetUserUATZpDetailList(@Param("usasszpid") Long usasszpid, @Param("userid") Long userid) throws Exception;

    public UserUATZpSummaryEntity GetUserUATZpSummary(@Param("userid") Long userid, @Param("templateid") Long templateid, @Param("year") int year, @Param("quarter") int quarter) throws Exception;

    public List<UserUATZpSummaryEntity> GetUserUATZpSummaryList(@Param("userid") Long userid, @Param("where") String where) throws Exception;

    public List<UserUATZpSummaryEntity> GetUserUATZpSummaryListTssx(@Param("userid") Long userid, @Param("where") String where, @Param("year") int year, @Param("quarter") int quarter) throws Exception;

    public int GetUserUATZpSummaryListCount(@Param("userid") Long userid, @Param("where") String where) throws Exception;

    public List<UserUATZpSummaryEntity> GetUserUATZpSummaryListByWhere(@Param("where") String where) throws Exception;

    public List<UserUATZpSummaryEntity> GetUserUATZpSummaryListByWhereTssx(@Param("where") String where, @Param("year") int year, @Param("quarter") int quarter) throws Exception;

    public int GetUserUATZpSummaryListCountByWhere(@Param("where") String where) throws Exception;


    public int DeleteUATZp(@Param("usasszpid") Long usasszpid, @Param("userid") Long userid) throws Exception;

    public UserUATZpSummaryEntity GetUserUATZpSummaryForMzpd(@Param("userid") Long userid, @Param("year") int year, @Param("quarter") int quarter) throws Exception;

    public List<UserUATZpDetailEntity> GetZpDetailListRowSpan(@Param("usasszpid") Long usasszpid) throws Exception;

    public UserUATZpSummaryEntity GetUserUATZpSummaryById(@Param("usasszpid") Long usasszpid) throws Exception;

    public int UpdateUserUATZpSummary(UserUATZpSummaryEntity entity) throws Exception;

    public int UpdateStatus(@Param("usasszpid") Long usasszpid, @Param("status") int status) throws Exception;

    public int AddUsasstempNodeZp(@Param("usasszpid") Long usasszpid, @Param("userid") Long userid, @Param("year") int year, @Param("quarter") int quarter) throws Exception;

    public List<UserUATZpSummaryEntity> GetUserZpListProcess(@Param("where") String where, @Param("year") int year, @Param("quarter") int quarter, @Param("beginrow") int beginrow, @Param("endrow") int endrow) throws Exception;

    public List<UserUATZpSummaryEntity> GetOldUserZpListProcess(@Param("where") String where, @Param("year") int year, @Param("quarter") int quarter, @Param("beginrow") int beginrow, @Param("endrow") int endrow) throws Exception;

    public int GetUserZpListProcessCount(@Param("where") String where) throws Exception;

    public int GetOldUserZpListProcessCount(@Param("where") String where) throws Exception;

    public int InsertUserUatAtt(UserUATZpAtt entity) throws Exception;

    public UserUATZpAtt GetUserUATZpAtt(@Param("usasszpid") Long usasszpid) throws Exception;

    public int UpdateUserUATZpAtt(UserUATZpAtt entity) throws Exception;

    public int DeleteUserUATAtt(@Param("usasszpid") Long usasszpid) throws Exception;

    public int UpdateUserUATZpAttStatus(@Param("usasszpid") Long usasszpid, @Param("status") int status) throws Exception;

    public UserUATZpAtt GetUserUATZpAttByWhere(@Param("where") String where) throws Exception;

    public List<PSKH> pskhResult(@Param("year") int year, @Param("quarter") int quarter);


    public List<NewPSKH> newpskhResult(@Param("year") int year, @Param("quarter") int quarter);

    public List<Map> bcjke(@Param("year") int year, @Param("quarter") int quarter);

    public List<PSKH> bdjg(@Param("year") int year, @Param("quarter") int quarter);

    public List<UserCount> getUserCount();

    public int addOpinion(PSKHOpinion pskhOpinion);

    public int updateOpinion(PSKHOpinion pskhOpinion);

    public PSKHOpinion getOpinion(@Param("year") int year, @Param("quarter") int quarter);


    public List<DYStatistics> getDYList(@Param("year") int year, @Param("quarter") int quarter, @Param("dw") int dw) throws Exception;


    public int addBDDC(BDDCOpinion bddcOpinion);

    public void deleteBDDC(@Param("year") int year, @Param("quarter") int quarter);

    public List<BDDCOpinion> getBDDC(@Param("year") int year, @Param("quarter") int quarter);

}
